<template>
	<view class="content">
		<view class="nav">
		<myNav class="mynav" path='/pages/chat/chat'>
			<template v-slot:img>
				<image  class="showimg" src="/static/navImg/1.jpg" mode="aspectFill"></image>
			</template>
			<template v-slot:text>
				<view class="text">聊天室</view>
			</template>
		</myNav>
		<myNav class="mynav" path='/pages/leavemsg/leavemsg'>
			<template v-slot:img>
				<image class="showimg" src="/static/navImg/2.jpg" mode="aspectFill"></image>
			</template>
			<template v-slot:text>
				<view class="text">留言板</view>
			</template>
		</myNav>
		<myNav class="mynav">
			<template v-slot:img>
				<image class="showimg" src="/static/navImg/3.jpg" mode="aspectFill"></image>
			</template>
			<template v-slot:text>
				<view class="text">动态</view>
			</template>
		</myNav>
		<myNav class="mynav">
			<template v-slot:img>
				<image class="showimg" src="/static/navImg/4.jpg" mode="aspectFill"></image>
			</template>
			<template v-slot:text>
				<view class="text">更多</view>
			</template>
		</myNav>
		</view>
	</view>
</template>

<script>
	import {request} from"@/api/request.js"
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {
			// console.log("-----", basicConfig)
			
			var res = request({
				url: '/chat/GetUserInfo',
				method:'GET',
				data:{}
			}).then(res =>{
				// console.log(res)
				if (res.code == 1){
					
					uni.setStorage({
						key: 'userInfo',
						data: res.data,
						success: function () {
							console.log('success');
						}
					});
				}
			})
			
			
			
			
			
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.nav{
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		margin: 30rpx 55rpx;
		margin-bottom: 20rpx;
		
		.mynav{
			margin-bottom: 10rpx;
		}
	}
	.showimg{
		width: 280rpx;
		height: 280rpx;
	}
	.content{
		background-color: #f4f4f4;
	}
</style>
